<template>
  <div class="child">
    <h3>孙组件</h3>

    <h4>{{ c }}</h4>
    <h4>{{ d }}</h4>
    <h4>{{ x }}</h4>
    <h4>{{ y }}</h4>
    <h4>{{ z }}</h4>
    <button @click="fn(6)">给我爷爷更新+6</button>
  </div>
</template>

<script setup lang="ts" name="Child">
import { ref } from "vue";
defineProps(["c", "d", "x", "y", "z", "fn"]);
</script>

<style scoped>
.child {
  background-color: skyblue;
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 0 10px black;
}
</style>
